//
//  WalletTableViewCell.m
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/8.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#import "WalletTableViewCell.h"
#import <UIImageView+WebCache.h>
#import "NSString+FloatString.h"

@interface WalletTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *info;

@end
@implementation WalletTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    LRViewBorderRadius(self.bgView, 10, 0, [UIColor clearColor]);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)refreshWith:(CoinItemModel *)model{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:model.iconUrl]];
    self.title.text = model.name;
    
//    model.balance = 95.013412341234239;	
    NSString *str = [[NSString stringWithFormat:@"%@",@(model.balance)] floatString];
    self.info.text = str;
}

@end
